﻿@page "/"

<h1>Component parameter passing behavior</h1>

<All 
    name="annie" 
    age=33 
    Height=175 
    is-working=true 
    ride-bike=@CanRideBike
    dob=DateOfBirth 
    graduation-date=@DateOfGraduation 
    publication-date="@DateOfPublication" 
    can-fly=@CanFly 
    can-swim="@CanSwim"
    iq=@IQ 
    colors=@FavoriteColors 
    couragestats=@CourageStats
    humorstats=@HumorStats
    CalmnessStats=CalmnessStats
/>

@code
{
    public bool CanRideBike { get; set;} = true;

    public DateTime DateOfBirth = DateTime.Parse("1986-1-1");

    public DateTime DateOfGraduation = DateTime.Parse("2021-5-1");

    public DateTime DateOfPublication = DateTime.Parse("2021-10-1");

    public bool CanFly {get; set;} = false;

    public bool CanSwim {get; set;} = true;

    public int IQ = 200;

    public List<string> FavoriteColors { get; set; } = new List<string>() { "red", "green" };

    const int CourageStats = 90;

    public int HumorStats { get; set; } = 99;

    public int CalmnessStats {get; set; } = 55;
}
